import {SAVESONGLISTDETAIL, SAVESINGERDETAIL ,ADDPLAYSONG,CHANGECURRENTPLAYSONG,CHANGEMUSICLISTSTATE, INITMUSICLISTSTATE, DELSONG, DELALLSONG, ADDALLSONGTOMUSICLIST, SAVEPLAYSONGCURRENTTIME} from "./mutations-types"


export default {
  // 保存单个歌单信息
  saveSongListDetail({commit}, payload) {
    commit(SAVESONGLISTDETAIL, payload)
  },
  // 保存单个歌手信息
  saveSingerDetail({ commit }, payload) {
    commit(SAVESINGERDETAIL, payload)
  },
  // 保存将要播放的歌曲
  addPlaySong({ commit }, payload) {
    commit(ADDPLAYSONG, payload)
  },
  // 修改当前播放的音乐
  changeCurrentPlaySong({ commit }, payload) {
    commit(CHANGECURRENTPLAYSONG, payload)
  },
  // 修改播放列表状态
  changeMusicListState({ commit }) {
    commit(CHANGEMUSICLISTSTATE)
  },
   // 初始化播放列表状态
  initMusicListState({ commit }) {
    commit(INITMUSICLISTSTATE)
  },
  // 删除某首歌曲
  delSong({ commit }, payload) {
    commit(DELSONG, payload)
  },
  // 删除全部的列表音乐
  delAllSong({ commit }) {
    commit(DELALLSONG)
  },
  // 将歌单内的所有歌曲添加到播放列表
  addAllSongToMusicList({ commit }, payload) {
    commit(ADDALLSONGTOMUSICLIST, payload)
  },
  // 保存当前播放音乐的播放时间
  savePlaySongCurrentTime({ commit }, payload) {
    commit(SAVEPLAYSONGCURRENTTIME, payload)
  }
} 